import { Map } from 'immutable'
import { SAVE_USER } from './useractioncreater'
const defaultstore = Map({
    user: {
        username: "",
        password: "",
        profile: "",
        nickname: "",
        aventer: ""
    }
})

export default function reducer(prestore = defaultstore, action) {
    const { type, data } = action;
    switch (type) {
        case SAVE_USER: return { ...prestore, user: data }
        default: return prestore
    }
}